<?php
	include "../ketnoi.php";
	$MaLaiSuatGui = $_POST["MaLaiSuatGui"];
	$PhanTramLaiSuatGui = $_POST["PhanTramLaiSuatGui"];
	$laisuatgui = new laisuatguibs();
	date_default_timezone_set('Asia/Ho_Chi_Minh');
	$NgayCapNhat = date("Y-m-d", time());
	$sql = "UPDATE laisuatgui set PhanTramLaiSuatGui = $PhanTramLaiSuatGui, NgayCapNhat = '$NgayCapNhat' WHERE MaLaiSuatGui = $MaLaiSuatGui";
	$kq = mysql_query($sql);
	if($kq)
	{
		session_start();
		$nhatky = new nhatkybs();
		$nhatky->TenSuKien = "Sửa lãi suất gửi";
		$nhatky->MaNguoiDung = $_SESSION["MaND"];
		date_default_timezone_set('Asia/Ho_Chi_Minh');
		$nhatky->ThoiGian = date("Y-m-d H:m:s", time());
		$nhatky->Them();
		header("Location:index.php?do=laisuatgui");
	}
	else 
	{
		$_SESSION["LoiThemLaiSuatGui"]= "Lỗi ".mysql_error();
		header("Location:index.php?do=laisuatgui");
	}
?>